--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
docs/agents/skills/rns-link-api/SKILL.md HEAD (b89dc9e6) Text, 1.93 KB
Skill: rns-link-api
Implement or consume the generic RNS Link WebSocket transport and plugin manager capabilities without breaking auth, caching, or disconnect cleanup.
When to use
• Changing T383838rns.link.* WebSocket handlers or T383838RnsLinkManager
• Exposing link open/request/send to plugins
• Building external tools that treat MeshChatX as an RNS transport
• Debugging stuck opens, leaked links, or auth failures on link mutators
Protocol (summary)
Client → server types: T383838rns.link.open|identify|request|send|close with T383838request_id.
• T383838aspect is dot-separated RNS app name + sub-aspects (example T383838microrn.mgmt).
• Payloads are msgpack, base64-encoded (T383838data_b64, T383838payload_b64, T383838body_b64).
• Links are cached per T383838(aspect, destination_hash). T383838close tears down and uncaches.
• In-flight T383838open / T383838request tasks cancel when that WebSocket client disconnects.
• Server replies reuse the same T383838type with T383838status of T383838phase / T383838progress / T383838success / T383838failure.
• Broadcasts: T383838rns.link.event (T383838packet_received, T383838link_closed).
Full table: T383838docs/en/rns-link-api.md.
Auth and plugins
• When password auth is enabled, all T383838rns.link.* client messages require an authenticated session (same as other WS mutators). See T383838auth-csrf-ws-security.
• Plugins need T383838permissions.managers entries such as T383838rnsLink.open and optional T383838hooks: ["rns.link.event"].
• Invoke via T383838POST /api/v1/plugins/{id}/invoke with T383838method: "callManager".
• New manager names must be added to T383838KNOWN_MANAGERS (see T383838plugin-install-security).
Key files
• T383838docs/en/rns-link-api.md
• T383838meshchatx/src/backend/rns_link_manager.py
• T383838meshchatx/meshchat.py (WS dispatch, per-client task tracking)
• T383838meshchatx/src/backend/plugin_manager.py
• T383838meshchatx/src/backend/websocket_config_guard.py
Verification
T282828
uv run pytest tests/backend/test_rns_link_manager.py tests/backend/test_rns_link_plugin.py -q --tbTff7b72=short
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────